from . import Nest


class Meta(object):

    def __init__(self, nest):
        if not isinstance(nest, Nest):
            raise TypeError(
                'First argument is expected to be an instance of Nest, '
                'not ' + str(nest)
            )
        self._nest = nest

    def get_path_parser_type(self):
        return self._nest.path_parser_type

    def make(self):
        meta_type = self._nest.meta_type
        return meta_type(self._nest)
